home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Mops 2.7 / Mops Manual / Part I.srd / Part I.srd.rsrc / PICT_53.png < prev    next >
Portable Network Graphic  |  1996-01-02  |  121KB  |  816x1056  |  8-bit (256 colors)
Labels: book | reckoner | sky | tree
OCR: Lesson 11 How Mops makes decisions decision -both the human and computer kind -is little more than the result of a test of condi tions For example: if it is true that the light switch is ON when you leave the room. then you make small detour to hit the switch on your way out In other words, you are testing for-a cer tain condition in the course of vour normal operation. If the condition true then you d something accordingly If the condition is false, then you carry on with your normal operation as if nothing had happened. This THEN decision construction is precisely what goes on inside the computer when your program needs to test for a specific cond lition -like whether a number is ppo or even; whether the program user typed in the correct answer; and so on In Mops (as in other Forths) the ...